]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overview: Minor cleanup
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 20 Aug 2019 02:25:24 +0000 (04:25 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Wed, 11 Sep 2019 20:59:31 +0000 (20:59 +0000)
Safe one indentation level by combining conditions.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710

js/ui/overview.js

index 1325eff6b54a3251cacd3505a600d91539f55b65..49907b9d29c81ef37445f5355984d513fb039c92 100644 (file)
@@ -481,15 +481,13 @@ var Overview = class {
 
         if (this._shown) {
             let shouldBeModal = !this._inXdndDrag;
-            if (shouldBeModal) {
-                if (!this._modal) {
-                    if (Main.pushModal(this._overview,
-                                       { actionMode: Shell.ActionMode.OVERVIEW })) {
-                        this._modal = true;
-                    } else {
-                        this.hide();
-                        return false;
-                    }
+            if (shouldBeModal && !this._modal) {
+                let actionMode = Shell.ActionMode.OVERVIEW;
+                if (Main.pushModal(this._overview, { actionMode })) {
+                    this._modal = true;
+                } else {
+                    this.hide();
+                    return false;
                 }
             }
         } else {